USE [ERP]
GO

/****** Object:  StoredProcedure [dbo].[SP_HOBBIES_GET]    Script Date: 11/16/2009 14:38:06 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		Yaser
-- Create date: Jul 17 09
-- =============================================
CREATE PROCEDURE [dbo].[SP_HOBBIES_GET]
	-- Add the parameters for the stored procedure here	
	@ID nvarchar(50)
AS
BEGIN
	IF @ID IS NULL
		BEGIN
			SELECT [ID] ,[Name]	, ObsoleteFlag FROM Hobbies
		END
	ELSE
		BEGIN
			SELECT [ID] ,[Name]	, ObsoleteFlag FROM Hobbies WHERE ID = @ID
		END
END

GO

